﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using CQIE.TES.Model;
using CQIE.TES.WEB.USER.Models;
using Newtonsoft.Json.Linq;

namespace CQIE.TES.IService
{
    public interface ICourseService
    {
        List<Course> GetCoursesInfo(int page, int limit, string search,out int count);

        List<Course> GetCoursesInfo(string search);

        bool Delete(int id);

        List<Teacher> CourserTeachers(int courseID);

        /// <summary>
        /// 给课程添加或删除可以任教的老师
        /// </summary>
        /// <param name="courseId"></param>
        /// <param name="teacherIds"></param>
        /// <param name="type">0移除 1添加</param>
        void GiveOrRemoveCourseTeacher(List<int> teacherList, int courseID,int type);
        
        /// <summary>
        /// 获取所有没被冻结的课程
        /// </summary>
        /// <returns></returns>
        List<Course> GetAllCourse();

        /// <summary>
        /// 通过学号获取其课程
        /// </summary>
        /// <param name="sid"></param>
        /// <returns></returns>
        List<Course> GetCourseByStudentID(int sid, int evaId);

//        /// <summary>
//        /// 获取班级课程
//        /// </summary>
//        /// <param name="classId"></param>
//        /// <param name="StudyYearId"></param>
//        /// <returns></returns>
//        List<Course> GetClassCourse(int classId, int studyYearId);

        /// <summary>
        /// 获取班级课程
        /// </summary>
        /// <param name="classId"></param>
        /// <param name="studyYearId"></param>
        /// <param name="count"></param>
        /// <param name="pageNum"></param>
        /// <param name="limit"></param>
        /// <param name="StudyYearId"></param>
        /// <returns></returns>
        List<Course> GetClassCourse(int classId, int studyYearId, out int count, int pageNum,int limit);

        /// <summary>
        ///添加课程
        /// </summary>
        /// <param name="data"></param>
        void InsertCourse(string name,string courseCode,bool isAlive);

        /// <summary>
        /// 获取班级没有的课程
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        List<Course> GetClassHaveNoCourse(int classId, int studyYear);

        /// <summary>
        /// 为班级添加课程
        /// </summary>
        /// <param name="classId"></param>
        /// <param name="studyYear"></param>
        /// <param name="courseId"></param>
        /// <param name="teacherId"></param>
        /// <returns></returns>
        bool ClassAddCourse(int classId, int studyYear, int courseId, int teacherId);
    }
}
